###############################################################################
#                                                                             #
# GILPS Makefile                                                              #
#                                                                             #
# In fact there is nothing to really 'make' since GILP is interpreted by YAP  #
#                                                                             #
# However, there are nice 'make' related utility functions below              #
#                                                                             #
###############################################################################

demo:
	yap -L run.pl

count:
	ls -dpQ source/*/* | grep 'pl"' | xargs wc
	
clean:
	ls -dpQ * */* */*/* | grep -v 'sh"' | grep -v 'pl"' | grep -v 'txt"' | grep -v '"/' | grep -v 'Makefile"' | xargs -r rm

update_ilp: clean
	rm -rf /vol/comp-bio/ilp/GILPS/source.bak
	mv /vol/comp-bio/ilp/GILPS/source /vol/comp-bio/ilp/GILPS/source.bak
	cp -r source /vol/comp-bio/ilp/GILPS/source

source: clean
	tar -cf source.tar source/*
	bzip2 -9 source.tar
	cp source.tar.bz2 /homes/jcs06/public_html

zip: clean
	tar -cf gilps.tar ../GILPS/*
	bzip2 -9 gilps.tar

publish: zip
	cp gilps.tar.bz2 /homes/jcs06/public_html

backup: clean
	rm -rf /vol/comp-bio/jcas/ILP/GILPS/source
	rm -rf /vol/comp-bio/jcas/ILP/GILPS/tests
	rm -rf /vol/comp-bio/jcas/ILP/GILPS/*.pl
	cp *.* /vol/comp-bio/jcas/ILP/GILPS/
	cp -R source /vol/comp-bio/jcas/ILP/GILPS/source
	cp -R tests /vol/comp-bio/jcas/ILP/GILPS/tests
